/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package peticionweb.logica.entidad;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author icardenas
 */
@Entity
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Cuper1m.findAll", query = "SELECT c FROM Cuper1m c")})
public class Cuper1m implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(nullable = false, length = 10)
    private String cidpe;
    @Basic(optional = false)
    @Column(nullable = false, length = 45)
    private String nompe;
    @Basic(optional = false)
    @Column(nullable = false)
    private long pmbpe;
    @Basic(optional = false)
    @Column(nullable = false, length = 30)
    private String corpe;
    @Basic(optional = false)
    @Column(nullable = false, length = 45)
    private String paspe;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cuper1m", fetch = FetchType.LAZY)
    private List<Cupar1a> cupar1aList;
    @OneToMany(mappedBy = "cuper1m", fetch = FetchType.LAZY)
    private List<Cuipe1d> cuipe1dList;

    public Cuper1m() {
    }

    public Cuper1m(String cidpe) {
        this.cidpe = cidpe;
    }

    public Cuper1m(String cidpe, String nompe, long pmbpe, String corpe, String paspe) {
        this.cidpe = cidpe;
        this.nompe = nompe;
        this.pmbpe = pmbpe;
        this.corpe = corpe;
        this.paspe = paspe;
    }

    public String getCidpe() {
        return cidpe;
    }

    public void setCidpe(String cidpe) {
        this.cidpe = cidpe;
    }

    public String getNompe() {
        return nompe;
    }

    public void setNompe(String nompe) {
        this.nompe = nompe;
    }

    public long getPmbpe() {
        return pmbpe;
    }

    public void setPmbpe(long pmbpe) {
        this.pmbpe = pmbpe;
    }

    public String getCorpe() {
        return corpe;
    }

    public void setCorpe(String corpe) {
        this.corpe = corpe;
    }

    public String getPaspe() {
        return paspe;
    }

    public void setPaspe(String paspe) {
        this.paspe = paspe;
    }

    @XmlTransient
    public List<Cupar1a> getCupar1aList() {
        return cupar1aList;
    }

    public void setCupar1aList(List<Cupar1a> cupar1aList) {
        this.cupar1aList = cupar1aList;
    }

    @XmlTransient
    public List<Cuipe1d> getCuipe1dList() {
        return cuipe1dList;
    }

    public void setCuipe1dList(List<Cuipe1d> cuipe1dList) {
        this.cuipe1dList = cuipe1dList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cidpe != null ? cidpe.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cuper1m)) {
            return false;
        }
        Cuper1m other = (Cuper1m) object;
        if ((this.cidpe == null && other.cidpe != null) || (this.cidpe != null && !this.cidpe.equals(other.cidpe))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "peticionweb.logica.entidad.Cuper1m[ cidpe=" + cidpe + " ]";
    }
    
}
